<template>
 <van-cell is-link class="cell" center>
          <template #icon>
            <i  class="iconfont p-right" v-html="icon"></i>
          </template>
          <template #title>
            <div class="title">
            {{title}}
            </div>
          </template>
          <template #default>
            <img class="avatar" v-if='type==="img" && value' :src="baseURL+value" alt="">
            <img  class="avatar" v-else-if='type==="img" && !value'  src="@/assets/login.jpg" alt="">
            <div v-else class="value">
             {{value}}
            </div>
          </template>
        </van-cell>
</template>

<script>
export default {
    props:['title','value','icon','type'],
   data() {
     return {
        baseURL:process.env.VUE_APP_URL
     }
   },

}
</script>

<style lang='less' scoped>
  .cell {
      
        width: 100%;
        .p-right {
          padding-right: 8px;
          font-size: 20px;
        }
        .title {
          font-size: 14px;
          font-family: PingFangSC, PingFangSC-Regular;
          font-weight: 400;
          text-align: left;
          color: #181a39;
          line-height: 20px;
          letter-spacing: 0px;
        }
        .value {
          font-size: 14px;
          font-family: PingFangSC, PingFangSC-Regular;
          font-weight: 400;
          text-align: right;
          color: #5b5d75;
          line-height: 20px;
          letter-spacing: 0px;
        }
        .avatar {
          width: 40px;
          height: 40px;
          border-radius: 50%;
        }
      }
</style>